package com.kaili.db.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.kaili.pojo.dto.ewb.EwbAddDTO;
import com.kaili.pojo.entity.BaseDict;
import com.kaili.pojo.entity.HsOptEwb;
import com.kaili.pojo.vo.*;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 服务类
 *
 * @author cgm
 * @since 2018-05-08
 */
public interface IHsOptEwbService extends IService<HsOptEwb> {
    int doSignByEwb(String ewb);

    boolean isSign(String ewb);

    int doAddEwb(EwbAddDTO addBean);

    void deleteEwbNo(String ewbNo);

    HsOptEwb getEWbByEwbNo(String ewb);

    Page<EwbQueryVO> queryEwbList(Page<EwbQueryVO> page, Map search);

    EwbSummaryVO queryEwbSummary(Map search);

    List<EwbQueryVO> queryEwbList(Map search);

    List<EwbQueryVO> queryEwbListByStowageNo(Map search);

    List<EwbQueryVO> queryUnLoadingEwbList(Map search);

    List<DailyDeliveryStatisticsVO> queryStatistics(Map search);

    Page<DailyDeliveryEwbVO> queryDailyDeliveryEwbList(Page<DailyDeliveryEwbVO> page, Map search);

    Page<ServiceReportVO> queryServiceStatistics(Page<ServiceReportVO> page, Map search);

    /**
     * 判断运单号是否存在
     *
     * @param ewbNo
     * @return
     */
    boolean isEwbNoRepeat(String ewbNo);

    Integer getInfoByEwbNo(Map map);

    Integer getInfoByEwbNoCount(Map map);

    // 根据寄件网点ID查询公司ID
    Integer selectCompanyId(Integer siteId);

    // 根据公司ID查询最大货量
    Double selectMaxVolume(String companyId);

    // 根据所有网点ID查询当日已使用吨位()
    Double selecthighVolume(String ewbNo, Date dateTime);
    // 根据流水号查询驾驶员ID

    Integer selectDriver(String operationId);

    int updateBatch(Map search);

    List<Map<String, Object>> getSettleMethod();

    List<Map<String, Object>> getPayMethod();

    // 查询数据字典ID 和字典名字
    List<BaseDict> selectDict();

    //添加客户
    int addCustomer(CustomerVO customer);

    //添加当前客户表最大编号
    String getMaxCustomerCode();
}
